package cn.tedu.tw.wyy;

import java.lang.reflect.Method;

public class AppRef {
    public static void main(String[] args) throws Exception{
        Class<?>C=Class.forName("cn.tedu.tw.wyy.User");

        Object u=C.newInstance();

        Method setName = C.getMethod("setName", String.class);

        setName.invoke(u,"Jenkins");

        Method getName=C.getMethod("getName");
        Object name=getName.invoke(u);
        System.out.println(name);
    }

}
